
#include "semantics_enum.h"
#include "main_container.h"
#include "semantic_analyzer.h"
extern MainContainer * CompilerData;

SemanticsEnum::SemanticsEnum()
{
	this->Enums = new GenericTable<int>();
	this->Name = new GenericTable<int>();
}


SemanticsEnum::~SemanticsEnum()
{
	if(Enums != NULL)
	{
		delete Enums;
		Enums = NULL;
	}

	if(Name != NULL)
	{
		delete Name;
		Name = NULL;
	}
}


#ifdef DEBUG
void SemanticsEnum::DebugXMLOutput(FILE * fo)
{
	fprintf(fo, "<semanticsEnum name=\"");
	SemanticAnalyzer::DebugOutputNameFromTable(fo, this->Name, CompilerData->Units);

	fprintf(fo, "\" enums=\"");
	SemanticAnalyzer::DebugOutputNameFromTable(fo, this->Enums, CompilerData->Units);

	fprintf(fo, "\" />\n");

}
#endif
